package cn.tedu._01mavenboot01.controller;

import cn.tedu._01mavenboot01.pojo.dto.useregDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {
    /**
     * Request Mapping 注解:用于映射请求，根据
     * 请求的路径PATH，映射到对应的具体控制器方法
     * ResponseBody 注解:响应注解,允许控制器方法返回值直接作为响应内容返回给客户端
     * @return
     */
    @RequestMapping("/v1/user/login")
    @ResponseBody
    public String login(useregDTO dto){
        String username = dto.getUsername();
        String password = dto.getPassword();
        return "欢迎你"+username+"密码为:"+password;
    }
}
